From: Florian Müllner Date: Fri, 1 Mar 2024 17:28:08 +0000 (+0100) Subject: tests: Remove assertArraysEqual() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~226^2^2~132 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cf1159e6c027dc7e9920085b47cc37f867c3b7e1;p=gnome-shell.git tests: Remove assertArraysEqual() It is tied to the legacy jsUnit framework and now unused. Part-of: --- diff --git a/tests/common/assertions.js b/tests/common/assertions.js deleted file mode 100644 index c254da0cc..000000000 --- a/tests/common/assertions.js +++ /dev/null @@ -1,15 +0,0 @@ -const JsUnit = imports.jsUnit; - -/** - * Asserts if two arrays have the same length and each element passes assertEquals - * - * @template T - * @param {string} errorMessage an error message if the arrays are not equal - * @param {T[]} array1 the first array - * @param {T[]} array2 the second array - */ -export function assertArrayEquals(errorMessage, array1, array2) { - JsUnit.assertEquals(`${errorMessage} length`, array1.length, array2.length); - for (let j = 0; j < array1.length; j++) - JsUnit.assertEquals(`${errorMessage} item ${j}`, array1[j], array2[j]); -}